About the Cached DataSet Demo

The DBWebDataSource component works directly with the DataSet, without any knowledge of where it gets its data (from a DataAdapter, from XML, etc.). One drawback of this is that if your are working with a BdpDataAdapter, where the Active property is true, each client request will result in the DataSet being filled with the Server data. This means that a round trip needs to be made between the Web Server and the database server each time a client hits the server.

This application shows how to avoid this by caching the DataSet as a Session variable. A property called CachedDataSet has been added to the WebPage, and its getter and setter shows how to store and retrieve the DataSet as a session variable. Then, in on the OnInit() method, code has been added to set the BdpDataAdapter.Active property to true if no cached DataSet is found (in which case a RT to the server is required), or to fill the DataSet with the data from the session object if the cached dataset is found, thereby avoiding a RT to the server. Finally, whenever changes are applied to the server in the OnApplyChangesRequest event, the DataBase Session variable is cleared.

Setup Information

Running the Demo

  1. Start the IDE.
  2. Open this project.
  3. Complete the steps from the Setup Informationsection above.
  4. Compile the Applicaton (Project Menu, Compile all projects).
  5. Run the application with debugging (F9) or without debugging (Shift+Ctrl+F9)